\lstset{
	language=Java,
	caption={Simple optional field mapping code},
	basicstyle=\tiny,
	label=optionalfieldmapping,
	tabsize=2
}
\begin{lstlisting}[frame=single]
// Mapping of 4 separate optional fields
if (cissFltIn.hasPrefix3()) {
	cdmFltOut.setPrefix3(cissFltIn.getPrefix3());
}
if (cissFltIn.hasPrefix()) {
	cdmFltOut.setPrefix(cissFltIn.getPrefix());
}
if (cissFltIn.hasSuffix()) {
	cdmFltOut.setSuffix(cissFltIn.getSuffix());
}
\end{lstlisting}

\lstset{
	language=Java,
	caption={More complex field mapping code},
	basicstyle=\tiny,
	label=morecomplexcode,
	tabsize=2
}
\begin{lstlisting}[frame=single]
// Mapping of 3 input field to 1 output field
if (iCompIn.hasIata_m()) {
	acType = iCompIn.getIata_m();
	if (iCompIn.hasIata_s()) {
		acType += iCompIn.getIata_s();
	}
} else if (iCompIn.hasIcao()) {
	acType = iCompIn.getIcao();
}
favisOut.setPIV_ACTYPE( acType );
\end{lstlisting}